package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @Date:2021/6/29 11:31
 * @Author:郑伟
 * @Version:1.1.0
 */
@Controller
@RequestMapping("/device")
public class DeviceController {
    @RequestMapping("/index")
    public String list(HttpServletRequest httpServletRequest){
        if(httpServletRequest.getSession().getAttribute("name")!=null){
            return "/device/index";
        }else {
            return "redirect:/device/index";
        }

    }
}
